
<template>
    <div ref="chartEl" :style="{ width: `500px`, height: `500px` }"></div>
</template>

<script setup>
import { onMounted, ref, computed, nextTick } from "vue";
import useChart from '@/hooks/useEchart'
import { option } from "./Macroeconomics/optionConfig.js";

const chartEl = ref(null)

const {
    setOption,
} = useChart(chartEl, true, true)



onMounted(() => {
    nextTick(() => {
    	// 显示loading
        // showLoading()
        // 假装有网络请求 ...
        // 渲染图表
        setOption(option);
    })
})

</script>
